package org.jeecg.modules.oa.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.oa.entity.NodePosition;
import org.jeecg.modules.oa.mapper.NodePositionMapper;
import org.jeecg.modules.oa.service.INodePositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 审批节点岗位表
 * @Author: jeecg-boot
 * @Date:   2019-12-04
 * @Version: V1.0
 */
@Service
public class NodePositionServiceImpl extends ServiceImpl<NodePositionMapper, NodePosition> implements INodePositionService {
    @Autowired
    private NodePositionMapper nodePositionMapper;
    @Override
    public void savePositionBatch(String nodeId,String mainId,  List<String> positionIdList) {
        nodePositionMapper.savePositionBatch(nodeId,mainId, positionIdList);
    }

    @Override
    public List<NodePosition> selectByNodeId(String nodeId) {
       return nodePositionMapper.selectByNodeId(nodeId);
    }

    @Override
    public void deleteByNodeId(List<NodePosition> nodePositions) {
        nodePositionMapper.deleteByNodeId(nodePositions);
    }
}
